﻿using System;
using DDDSample.Domain.Cargo;

namespace DDDSample.UI.Mvc.Models
{
    public class LegViewModel
    {
        public LegViewModel() { }

        public LegViewModel(Leg leg)
        {
            From = leg.LoadLocation.UnLocode.CodeString;
            To = leg.UnloadLocation.UnLocode.CodeString;
            LoadTime = leg.LoadDate;
            UnloadTime = leg.UnloadDate;
        }

        public string To { get; set; }

        public string From { get; set; }

        public DateTime LoadTime { get; set; }

        public DateTime UnloadTime { get; set; }

        public string VoyageNumber { get { return "XXX"; }}
    }
}